/**
 * Sample React Native App
 * https://github.com/facebook/react-native
 *
 * @format
 * @flow strict-local
 */

import React from 'react';
import {
  StyleSheet,
  Text,
  View,
  SafeAreaView,
  Button,
  Linking,
} from 'react-native';
import Icon from 'react-native-vector-icons/FontAwesome';

const App = () => {
  return (
    <SafeAreaView style={styles.container}>
      <View style={styles.layer}>
        <Text>11</Text>
        <Text>22</Text>
        <Text>33</Text>
      </View>
      <View>
        <Text>Icon 组件</Text>
        <Icon name="home" size={30} color="#900" />
      </View>
      <View>
        <Button
          style={{
            margin: 50,
            backgroundColor: '#8d0101',
            color: 'red',
            height: 5,
          }}
          title="跳转1"
          onPress={() => {
            console.log('diani');
            Linking.openURL('https://www.baidu.com/');
          }}
        />
      </View>
    </SafeAreaView>
  );
};

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: 'gray',
    color: '#FFFFFF',
  },
  layer: {
    display: 'flex',
    height: 50,
    flexDirection: 'row',
    justifyContent: 'space-around',
    alignItems: 'center',
  },
});

export default App;
